<?php

 /**
  * @package JooS
  * @subpackage PHPackager
  */

  require_once "JooS/Helper/Abstract.php";

  class JooS_PHPackager_Helper_Detach extends JooS_Helper_Abstract {
    public function __invoke($name, $className, $methodName) {
      require_once "JooS/Event.php";
      require_once "JooS/PHPackager/Manager.php";

      $Event = JooS_Event::newInstance($name)
        ->detach(array($className, $methodName))
        ->commit(true);

      JooS_Event::newInstance(JooS_PHPackager_Manager::EVENT_OBSERVERS_COMMIT)
        ->notify( $Event );
    }
  }
